<?
include('includes/functions.php');

include('includes/sajax/sajaxLogin.php');
include('includes/sajax/sajaxResources.php');

sajax_init();
$sajax_request_type = "POST"; 
// ***** LOGIN
sajax_export('login');
sajax_export('logout');

// ***** RESOURCES
sajax_export("getResources");
sajax_export("getNewResources");
sajax_export("addResourceCat");
sajax_export("removeResourceCat");
sajax_export("removeOrphanedCats");
sajax_export("saveResource");
sajax_export("deleteResource");
sajax_export("getResourceForEdit");
sajax_export("exportResources");
sajax_export("getBadLinks");
sajax_export("getLevelSelects");

// These are questionable 
sajax_export("resourceEdit");
sajax_export("linkCheck");
sajax_export("linkCheckConfirm");
sajax_export("submitLink");
sajax_export("toggleLinkStatus2");
sajax_export("deleteLink");
sajax_export("resourceEditConfirm");
sajax_export("toggleLinkStatus");
sajax_handle_client_request();

// Check for logged status
if ($_SESSION[logged] != 1) {
	//$renderDesktop = 'none';
}	
?>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>TCN</title>
	<!-- CSS Files -->
	<link rel="STYLESHEET" href="css/stylesMozilla.css?LDGBN">
	<link rel="stylesheet" type="text/css" href="../ext2.0/resources/css/ext-all.css" />
	<link rel="stylesheet" type="text/css" href="css/desktop.css" />
    
    <!-- EXT JavaScript -->
    <script type="text/javascript" src="../ext2.0/adapter/ext/ext-base.js"></script>
 	<script type="text/javascript" src="../ext2.0/ext-all.js"></script>

    <!-- Desktop Specific JavaScript -->
    <script type="text/javascript" src="js/extjs/Desktop.js"></script>
    <script type="text/javascript" src="js/extjs/StartMenu.js"></script>
    <script type="text/javascript" src="js/extjs/TaskBar.js"></script>
    <script type="text/javascript" src="js/extjs/Module.js"></script>
	
	<!-- Desktop Window Definitions -->
	<script type="text/javascript" src="js/windowLoad.js"></script>
	<script type="text/javascript" src="js/windows/windowLogin.js"></script>
	<script type="text/javascript" src="js/windows/windowResources.js"></script>
	<script type="text/javascript" src="js/windows/windowToolbox.js"></script>
	<script type="text/javascript" src="js/windows/windowUsers.js"></script>
    
	<!-- Protaculous -->
	<SCRIPT src="js/protaculous/prototype.js" language="JavaScript" type=text/javascript></SCRIPT>
	<SCRIPT src="js/protaculous/scriptaculous.js?load=effects,dragdrop" language="JavaScript" type="text/javascript"></SCRIPT>
	
	<!-- Application AJAX JavaScript -->
	<SCRIPT src="js/jsLogin.js" language="JavaScript" type=text/javascript></SCRIPT>
	<SCRIPT src="js/jsResources.js" language="JavaScript" type=text/javascript></SCRIPT>
	<SCRIPT src="js/jsCommon.js" language="JavaScript" type=text/javascript></SCRIPT>	    
	
    <script language="JavaScript">
		<? sajax_show_javascript(); ?>
	</script>
	
</head>
<body scroll="no">
<div id="loading-mask" style=""></div>
  <div id="loading">
    <div class="loading-indicator"><img src="../ext2.0/resources/images/default/shared/large-loading.gif" width="32" height="32" style="margin-right:8px;" align="absmiddle"/>Loading...</div>
  </div>
<div id="x-desktop">
    <a href="http://extjs.com" target="_blank" style="margin:5px; float:right;"></a>
    <a href="#" onClick="UserWindow.createWindow();">Open User Window</a>
    <dl id="x-shortcuts">
        <dt id="resourceManager-shortcut">
            <a href="#"><img src="images/s.gif" />
            <div>Resource Manager</div></a>
        </dt>
        <dt id="eventManager-shortcut">
            <a href="#"><img src="images/s.gif" />
            <div>Event Manager</div></a>
        </dt>
		<dt id="siteMessages-shortcut">
            <a href="#"><img src="images/s.gif" />
            <div>Site Messages</div></a>
        </dt>
		<dt id="districtDocuments-shortcut">
            <a href="#"><img src="images/s.gif" />
            <div>District Documents</div></a>
        </dt>
		<dt id="userManager-shortcut">
            <a href="#"><img src="images/s.gif" />
            <div>User Manager</div></a>
        </dt>
    </dl>
</div>

<div id="ux-taskbar">
	<div id="ux-taskbar-start"></div>
	<div id="ux-taskbuttons-panel"></div>
	<div class="x-clear"></div>
</div>

</body>
</html>
